/*
 * @description: 
 * @Author: Islands
 * @Date: 2024-06-23 13:02:48
 * @LastEditTime: 2024-06-24 17:36:34
 */
import { PropType } from "vue";
import { IFormConstant, IDetailsConstant } from '@/api/types/index.d';

export const dialogProps = {
    //add-edit 组件有效，判断新增/修改
    edit:{
        type:Boolean,
        default:false
    },
    constants: {
        type: Object as PropType<Array<IFormConstant>>,
        required: true
    },
    data: {
        type: Object as PropType<any>,
        default: {},
        required: true
    },
    title: {
        type: String as any,
        default: ''
    },
    width: {
        type: String,
        default: '50%'
    },
};



export const detailsProp = {
    constants: {
        type: Object as PropType<Array<IDetailsConstant>>,
        required: true
    },
    /** 渲染对象 */
    data: {
        type: Object as PropType<any>,
        default: {},
        required: true
    },
    /** 传入对象 */
    importData: {
        type: Object as PropType<any>,
        default: {},
    },
    title: {
        type: String as any,
        default: '详情'
    }
};


export interface Emits {
    (e: 'detailsChange', data: any): () => void;
    (e: 'submitChange', data: any,cb?:(flag:boolean)=>void): () => void;
}





export interface Emits {
    (e: 'click', val: number): () => void;
    (e: 'deleteBatchChange', ids: any): () => void;
    (e: 'confirmEvent', id: any): () => void;
    
}